var Event = require('events');


var emitter = new Event.EventEmitter;
var eventHandler = function connect(dd){
    console.log('链接成功');
    console.log(dd);
    emitter.emit('readData');
}

emitter.on('connection',eventHandler);
emitter.on('readData',function(){
    console.log('读取数据');
})


emitter.emit('connection','123');

